import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.CassandraHostConfigurator;
import me.prettyprint.hector.api.Cluster;
import me.prettyprint.hector.api.Keyspace;
import me.prettyprint.hector.api.beans.HColumn;
import me.prettyprint.hector.api.factory.HFactory;
import me.prettyprint.hector.api.mutation.MutationResult;
import me.prettyprint.hector.api.mutation.Mutator;



public class Testando {
	public static void main(String[] args) {
		System.out.println("fio");
		Cluster cluster = HFactory.getOrCreateCluster("Testando",
				new CassandraHostConfigurator("localhost:9160"));

		String columnFamily = "data";
		StringSerializer stringSerializer = new StringSerializer();
		
		Keyspace keyspace = HFactory.createKeyspace("Teste2", cluster);
		Mutator<String> mutator = HFactory.createMutator(keyspace, stringSerializer);
		
		HColumn<String, String> column = HFactory.createColumn("coluna", "valor", stringSerializer, stringSerializer);
		
		MutationResult result = mutator.insert("test Insert", columnFamily, column);
		
		System.out.println(result);
	}
}
